package com.junqson.je.msg.controller;

import com.junqson.je.common.model.ApiResult;
import com.junqson.je.common.model.dto.MailDTO;
import com.junqson.je.msg.service.MailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Descriptions
 * @Company
 * @Author Junqson
 * @Date 2020/1/31 17:26
 * @Version 1.0
 */
@Slf4j
@RestController
public class MailController {


    @Autowired
    private MailService mailService;

    /**
     * 发送无附件邮件
     */
    @RequestMapping("/sendMail")
    public ApiResult sendMail(@RequestBody MailDTO mailDTO) {
        mailService.sendMail(mailDTO);
        return ApiResult.success();
    }


}
